package com.bfly.mall.order.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.bfly.core.config.ResourceConfigure;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 订单项列表
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/9/15 21:17
 */
public class OrderSkuListDTO implements Serializable {
    private static final long serialVersionUID = 8510369882648332497L;

    private String productName;
    private String skuName;
    private int buyCount;
    private String sn;
    private BigDecimal originalPrice;
    private BigDecimal salePrice;
    private BigDecimal payPrice;
    private boolean evaluate;

    @JSONField(serialize = false)
    private String cover;
    private String unit;
    private BigDecimal expressPrice;

    public String getUrl() {
        return StringUtils.isNotBlank(getCover()) ? ResourceConfigure.getResourceHttpUrl(getCover()) : "";
    }

    public boolean isEvaluate() {
        return evaluate;
    }

    public void setEvaluate(boolean evaluate) {
        this.evaluate = evaluate;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getSkuName() {
        return skuName;
    }

    public void setSkuName(String skuName) {
        this.skuName = skuName;
    }

    public int getBuyCount() {
        return buyCount;
    }

    public void setBuyCount(int buyCount) {
        this.buyCount = buyCount;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public BigDecimal getOriginalPrice() {
        return originalPrice;
    }

    public void setOriginalPrice(BigDecimal originalPrice) {
        this.originalPrice = originalPrice;
    }

    public BigDecimal getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(BigDecimal salePrice) {
        this.salePrice = salePrice;
    }

    public BigDecimal getPayPrice() {
        return payPrice;
    }

    public void setPayPrice(BigDecimal payPrice) {
        this.payPrice = payPrice;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public BigDecimal getExpressPrice() {
        return expressPrice;
    }

    public void setExpressPrice(BigDecimal expressPrice) {
        this.expressPrice = expressPrice;
    }
}
